package cn.edu.bjut.my.thinkinjava._2019_08_08_iocByHand;


import cn.edu.bjut.my.thinkinjava._2019_08_08_iocByHand.ioc.core.MyBeanFactory;
import cn.edu.bjut.my.thinkinjava._2019_08_08_iocByHand.ioc.core.MyBeanFactoryImpl;
import cn.edu.bjut.my.thinkinjava._2019_08_08_iocByHand.ioc.domain.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class IocApplication {

    @Test
    public void testInsert() throws Exception {
        MyBeanFactory factory = new MyBeanFactoryImpl();
        User user = (User)factory.getBeanByName("User");
        System.out.println(user.toString());
    }
}

